﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace devtm.Applications
{

    [DataContract()]
    public class ApplicationErrorModel
    {
        [DataMember()]
        public string Message { get; set; }
    }

    [DataContract()]
    public class ApplicationRegisterModel
    {

        [DataMember()]
        public string GuidApplication { get; set; }

        [DataMember()]
        public string GuidUser { get; set; }

        [DataMember()]
        public string UserName { get; set; }

    }

    [DataContract()]
    public class ApplicationInformationsModel
    {

        [DataMember()]
        public string GuidApplication { get; set; }

        [DataMember()]
        public string GuidUser { get; set; }

    }

    [DataContract()]
    public class ApplicationRegisterModelBack
    {

        [DataMember()]
        public string License { get; set; }

        [DataMember()]
        public string ErrorMessage { get; set; }

        [DataMember()]
        public bool Result { get; set; }

    }

    [ServiceContract(Name = "register", Namespace = @"http://devtm.fr/a2011/m10/")]
    public interface IApplicationOperationContract
    {

        [OperationContract()]
        ApplicationRegisterModelBack Register(ApplicationRegisterModel model);

        [OperationContract()]
        bool LogError(ApplicationErrorModel model);

        [OperationContract()]
        string Informations(ApplicationInformationsModel model);

    }


}
